package io.xccit.system.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.xccit.common.result.AjaxResult;
import io.xccit.model.system.SysDept;
import io.xccit.system.service.ISysDeptService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author CH_ywx
 * @date 2023-06-28
 * @description
 */
@Api(tags = "部门接口")
@RestController
@CrossOrigin
@RequestMapping("/api/system/sysDept")
public class SysDeptController {

    @Resource
    private ISysDeptService sysDeptService;

    @ApiOperation("部门列表")
    @GetMapping("/list")
    public AjaxResult<List<SysDept>> selectList(){
        List<SysDept> result = sysDeptService.selectList();
        return AjaxResult.ok(result);
    }

}
